<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<title>jcommand.sample package</title>
<head>
<!--

  @(#)package.html	1.60 98/01/27

  Copyright 1998 Sun Microsystems, Inc. 901 San Antonio Road, 
  Palo Alto, California, 94303, U.S.A.  All Rights Reserved.

  This software is the confidential and proprietary information of Sun
  Microsystems, Inc. ("Confidential Information").  You shall not
  disclose such Confidential Information and shall use it only in
  accordance with the terms of the license agreement you entered into
  with Sun.

  CopyrightVersion 1.2

-->
</head>
<body bgcolor="white">

Sample code demo for the usage of JCommand.

<h2>Example One:</h2>
<b>Open Internet Explorer and Close it after 10 seconds</b>
<br>
Sample program of JCommand library // Create the command to launch the
internet explorer
<br>
Command c1 = new Command("Internet");
<br>
c1.addAction(Action.Launch(Application.INTERNET_EXPLORER));
<br>
<br>
// Create the command to click ALT+F4
<br>
Command c2 = new Command("Close");
<br>
c2.addAction(Action .KeyHoldAndClick(KeyEvent.VK_ALT, KeyEvent.VK_F4));
<br>
<br>
// Create the command set
<br>
CommandSet cs = new CommandSet();
<br>
<br>
// Add the command in the command set
<br>
cs.addCommand(c1);
<br>
cs.addCommand(c2);
<br>
<br>
// Execute the commands
<br>
cs.runAllCommands(10000);
<br>

<!-- Put @see and @since tags down here. -->
@since 1.0.0

</body>
</html>

